package cn.pengpeng.zkdis;


public class Test extends Thread{
	public boolean isRuning = true;
	public void setRuning(boolean flag){
		isRuning  = flag;
	}
	
	@Override
	public void run() {
		while(isRuning == true){
			//空轮询
		}
		System.out.println("run-----isRuning="+isRuning);
	}
	
	public static void main(String[] args) throws Exception {
		Test t = new Test();
		t.start();
		Thread.sleep(1000);
		t.setRuning(false);
		
		System.out.println("已经设置为false");
		System.out.println(t.isRuning);
		
		
		
		
	}
	
	

}
